//
//  AllBaseViewController.h
//  yunqiphone
//
//  Created by Maple on 13-5-16.
//  Copyright (c) 2013年 ci123.com. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "Defines.h"

@class MBProgressHUD,AppDelegate;

@interface AllBaseViewController : UIViewController

@property (nonatomic,retain)UIView *nav;
@property (nonatomic,retain)UIView *navBackView;
@property (nonatomic,retain)UILabel *navTitle;
@property (nonatomic,retain)MBProgressHUD *hud;

@property (nonatomic,assign)BOOL canBack;
@property (nonatomic,assign)BOOL isWebview;
@property (strong, nonatomic)UIView *loadingView;
@property (nonatomic,assign)BOOL isHome;
@property (nonatomic,assign)BOOL isTarView;
@property (nonatomic,copy)void (^centerNavBlock)(NSInteger index);

//HUD加载提示
- (void)showHud:(NSString *)title isDim:(BOOL)isDim;
- (void)showHudComplete:(NSString *)title success:(bool)success;
- (void)ShowExclaHud:(NSString *)title;
- (void)hideHud;

- (AppDelegate *)getAppDelegate;

- (BOOL)isIncludeSpecialCharact: (NSString *)str;

//导航栏右边按钮
- (UIButton *)createNavRightButton:(NSString *)showName target:(id)target action:(SEL)action;
//设定默认选中项
- (void)setCenterNavSelectIndex:(NSInteger)index;
//导航栏右边图片按钮
- (UIButton *)createNavRightButtonWithImage:(NSString *)imageString withFrame:(CGRect)frame target:(id)target action:(SEL)action;
//头部滑动导航
- (UIView *)createNavCenterSilderWithNames:(NSArray *)names withBlock:(void (^)(NSInteger index))block;
- (UIView *)createNavCenterSilderWithNames:(NSArray *)names withBlock:(void (^)(NSInteger index))block isWider:(BOOL)wider;

//请求tabbar消息
- (void)requestTabBarData:(BOOL)isTimeRestricted;
//uitabbar 更新呢小红点显示
- (void)refreshTabBarData:(NSDictionary *)result;
- (void)refreshTabBar:(TabbarType)type; //4:all 0-3:对应的项目
//给图片增加小红点
- (UIImage*)imageAddRedDot:(NSString *)imageName;
//修改tabbar样式
- (void)changeTabbarStyleColor;
//获取当前时间戳
- (NSInteger)getTimeStamp;
- (NSString *)getStringFromDate:(NSDate *)date;

- (void)backPage:(id)button;

//去除字符串两端空格
- (NSString *)TrimStringSpace:(NSString *)str;

@end
